package kin.system.util;


import java.util.logging.Logger;

import kin.bean.system.DBType;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

public class DynamicDataSource extends AbstractRoutingDataSource {
    public static final Logger logger = Logger.getLogger(DynamicDataSource.class.toString());

    @Override
    protected Object determineCurrentLookupKey() {
        DBType key = DBType.dataSource1;//获得当前数据源标识符
        //logger.info("当前数据源 :" + key);
        return key;
    }

}